<?php  
	$keys = array_keys($_POST);
	$del_ids = array();
	foreach ($keys as $ids){
		if (strstr($ids, "item")){
			$del_ids[] = $ids;
		}
	}
	$restricted = 0;
	$error = 0;
	$files_ok = 0;
	foreach ($del_ids as $del_me){
		$pathinfo = pathinfo($_POST[$del_me]);	
		if ($pathinfo["extension"] == "zip"){
			$archive = new PclZip($_POST[$del_me]);
			if ($archive->extract(PCLZIP_OPT_PATH, $_GET["dir"].$language->common->value_47."_".$pathinfo["filename"]."/") < 0) {
				oyster_log("ERROR", $archive->errorInfo(true), "PCLZIP");
				$error++;
			}
			$files_ok++;
		} else {
			$restricted = 0;
		}
	}
	
	if (ALLOW_EASY_MOVE == true){
		build_foldersDB();
	}
	
	$ordner = $_GET["dir"];
	$included = true;
	include("System/Kernel/Includes/index.include.php");
	
	if ($error != 0){
		$head->_template_assign("ERROR", sprintf($language->errors->value_29,$error));
	} elseif ($restricted != 0){
		$head->_template_assign("ERROR", sprintf($language->errors->value_30,$error));
	} else {
		$head->_template_assign("STATUS", sprintf($language->stati->value_14,$files_ok));
	}
?>